<?php
defined('_JEXEC') or die;

class BakerysControllerBilladdress extends JControllerAdmin
{

	public function getModel($name = 'Billaddress', $prefix = 'BakerysModel', $config = array('ignore_request' => true))
	{
		$model = parent::getModel($name, $prefix, $config);
		return $model;
	}	
	
	public function createorder()
	{
		$model = $this->getModel();		
		if($model->createorder())
		{
			$location_id = JRequest::getVar("location_id");
			$location_alias = JRequest::getVar("location_alias");
			$this->setRedirect(JRoute::_("index.php?option=com_bakerys&view=purchasesuccess&location=$location_id:$location_alias"));	
		}
	}
}
